<?php
defined('BY_JYA') or exit('error');
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
$return=array();

if($_RQ['op']=='get'){
	$return['item']=array();
	$return['item']['func']="cfc('jy_messaging')->getsetting()";
	$return['htmls']=array (
		  'type' => 'edit',
		  'post' => 'post',
		  'edit_tab' => '基本设置',
		  'edits' => 
		  array (
		    0 => 
		    array (
		      'title' => '基本设置',
		      'list' => 
		      array (
				array ('name' => 'account','type' => 'string','title' => '管理员账号'),
				array ('name' => 'type','type' => 'radio','title' => '集成模式','options'=>'type'),
				array ('name' => 'appid','type' => 'string','title' => 'SKDAPPID'),
				array ('name' => 'accounttype','type' => 'string','title' => 'accountType'),
				array ('name' => 'cer','type' => 'text','title' => '云通讯证书'),
				array ('name' => 'func','type' => 'string','title' => '参数获取方法为','read'=>true,'help'=>'更多使用方法请参考官方文档：https://cloud.tencent.com/document/product/269?'),
		      ),
		    ),
		  ),
		);
	$return['type']=array('0'=>'独立模式','-1'=>'托管模式');
	exi($return);
}
if($_RQ['op']=='post'){
	$postdata=get_postdata();	
	$this->save_setting($postdata);
	exi('设置成功！','','/index/');
}
?>